//
//  NoteApp.swift
//  Note
//
//  Created by wangcl on 2024/9/12.
//

import SwiftUI

@main
struct NoteApp: App {
    @StateObject var viewModel = ViewModel()
    var body: some Scene {
        WindowGroup {
            if viewModel.firstLaunch {
                GuidePageView().environmentObject(viewModel)
            }else{
                if viewModel.isLogin {
                    FinderListView(list: FinderList(url: FinderList.rootURL))
                }else{
                    LoginView().environmentObject(viewModel)
                }
            }
        }
    }
}
